﻿using System.ComponentModel.DataAnnotations;
using hello.csharp.domain.Base;
using hello.csharp.domain.Common;

namespace hello.csharp.domain
{
    public class UserSnack : BaseRecord
    {
        /// <summary>
        ///     将Nickname的值变成大写规范化，提高数据库的查询效率，关于Nickname的查询都将转换成对NormalizedNickname的查询。
        /// </summary>
        [MaxLength(32)]
        [Index]
        public string NormalizedNickname { get; set; }

        /// <summary>
        ///     将Email的值变成大写规范化，提高数据库的查询效率，关于Email的查询都将转换成对NormalizedEmail的查询。
        /// </summary>
        [MaxLength(128)]
        [Index]
        public string NormalizedEmail { get; set; }

        /// <summary>
        ///     手机号杩
        /// </summary>
        [MaxLength(11)]
        [Index]
        public string Mobile { get; set; }

        /// <summary>
        ///     盐值
        /// </summary>
        [Required]
        [MaxLength(64)]
        public string Pepper { get; set; }

        /// <summary>
        ///     实际存储值
        /// </summary>
        [Required]
        [MaxLength(256)]
        public string Value { get; set; }
    }
}